Repository navigation
bugfix: conservar texto Unicode sin usar mb_chars - #5
Draft
benjaaguila wants to merge 2 commits into
Draft
benjaaguila wants to merge 2 commits into
benjaaguila wants to merge 2 commits into
Conversation
Mantener normalizacion NFC y truncamiento por bytes sin cortar caracteres. Rails 8.1 depreca mb_chars y Multibyte::Chars, usados al extraer documentos.
Conservar la conversion a UTF-8 de los bytes de los handlers y truncar mediante String#truncate_bytes sin cortar grafemas. Declarar ActiveSupport 6.0 como minimo para la API utilizada y cubrir ambos contratos sin invocar mb_chars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues relacionados
Sin ticket de Jira asociado. Parte del triage de Rails de Buk.
Problema
Rails 8.1 depreca
String#mb_charsyActiveSupport::Multibyte::Chars. El resolver los invoca al extraer documentos y provoca 36 errores residuales en Jenkins 153287/10.Cambio
Conservar los contratos del proxy mediante APIs de String: interpretar los bytes como UTF-8 sin mutar la fuente, normalizar a NFC y usar
truncate_bytes(..., omission: nil)para respetar límites por bytes sin cortar grafemas. Mantiene espacios, cadenas congeladas, el retorno nil del handler y el rechazo de límites negativos.ActiveSupport 6.0 es el mínimo declarado porque incorpora
truncate_bytes. Los boots de Buk usan 7.2.3.1 y 8.1.4.Un prepend que llama
superemite la deprecación dentro del método original. El cambio directo en el fork evita copiar su cuerpo en un monkey patch de Buk.Validación
bundle exec rspec spec/lib/file_handler/resolver_spec.rb: 8 ejemplos, 0 fallos con ActiveSupport 7.2.3.1 y 8.1.4, Ruby 3.4.9. La revisión original falla solo en la nueva prueba que prohíbe llamarmb_chars. Las demás pruebas confirman equivalencia, incluyendo bytes ASCII-8BIT y un emoji unido por ZWJ.La documentación registra el mínimo de ActiveSupport y el contrato de truncamiento. Buk fijará esta revisión en ambos lockfiles y verificará los consumidores en ambos boots. La confirmación agregada de Jenkins sigue pendiente.